from  interface.event import Event

class TestEvent:

    def __init__(self):
        self.event=Event()

    def test_add_event(self):
        #获取测试数据
        data={
            "eid": '74',
            "name": "iPhone26发布会",
            "limit": '200',
            "status": "0",
            "address": "汤臣一品",
            "start_time": "2022-10-23"
        }
        #发送请求,获取响应结果
        result=self.event.add_event(data)
        # 断言
        assert result.get('status_code')==200
        assert result.get('body').get('status')==10200
        assert result.get('body').get('message')=='add event success'

if __name__ == '__main__':
    te=TestEvent()
    te.test_add_event()




